package com.zk.schedule;


import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.zk.bcutil.HandleType;
import com.zk.bcutil.Header;
import com.zk.bcutil.Request;
import com.zk.bcutil.WSUtil;
import com.zk.bcutil.WebServiceConstants;

/**
 * WebService服务调度任务
 * @author xiaoxiong
 *
 */
@Component
public class WebServiceSchedule {
	
	
	/**
	 * 测试
	 * 批量推送机构
	 * @param organizations
	 */
	@Test
	public void pushOrganizationInfoLists() {
		Header header = new Header("TCM_PLAT_21", WebServiceConstants.SYS_INFO);
		HandleType handType = new HandleType(WebServiceConstants.MSG_HANDLETYPE_ADD);
		String result = WSUtil.getPushOrganizationClient().BC_OA_GETUSERINFO(new Request(header,handType, null).getXmlStr());
	/*	Header header = new Header("TCM_PLAT_21", WebServiceConstants.SYS_INFO);
		HandleType handType = new HandleType(WebServiceConstants.MSG_HANDLETYPE_ADD);
		try {
			String result = WSUtil.getPushOrganizationMutClient().acceptMessage(new Request(header,handType, organizations).getXmlStr());
			System.out.println(result+"==================");
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			System.out.println("推送机构信息至ESB，机构编码：");
		}*/
	}
}
